#ifndef _DSWGPIO_H
#define _DSWGPIO_H
#include <libbase/dswbase.h>
#include <dswgpio_mixdvr/dswgpio_mixdvr.h>

class CDswgpio : public CDswbase
{
public:
	CDswgpio(LPST_ENV_T pEnv);
	virtual ~CDswgpio();
private:
	static void cb_OnReadGPIO(struct bufferevent *bev, void *ctx){((CDswgpio*)ctx)->OnReadGPIO(bev);};
	virtual void OnReadGPIO(struct bufferevent *bev);
	virtual int OnMessage(EN_MSG_TYPE nMsgType, void * pParam);
private:
	void SetHDPower(bool bHDPowerOn);
private:
	int m_nGPIO_fd;
	struct bufferevent *m_pBev;
	bool m_bRebooting;
};
#endif

